A24 - LIS
https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_x
提出
code: python
n = int(input())
a = list(map(int, input().split()))
# dpi := i 番目までの最長
for i in range(n):
解答
code: python
import bisect
n = int(input())
a = list(map(int, input().split()))
size = 0
l = []
dp = None * n
for i in range(n):
pos = bisect.bisect_left(l, ai)
dpi = pos
if dpi >= size:
l.append(ai)
size += 1
else:
l[dpi] = ai
print(size)